/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import dao.TransDAO;
import entity.Trans_1;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

@ManagedBean
@RequestScoped
public class Consultation {

    private TransDAO transDAO = new TransDAO();
    private List<Trans_1> trans_1s;
    private List<String> oks=new ArrayList<String>();
    private Date d=new Date();
    public Consultation() {
        oks.add("NOTOK;billet inexistante");
        oks.add("NOTOK;demi tarif  utiliser");
        oks.add("NOTOK;handicap spectacle invalide");
        oks.add("NOTOK;invalide Spectacle");
        oks.add("NOTOK;Invitation port invalide  ");
        oks.add("NOTOK;KIT GRATUIT 1 personnes utiliser");
        oks.add("NOTOK;KIT GRATUIT 2 personnes utilisee");
        oks.add("NOTOK;KIT GRATUIT 2 personnes utiliser");
        oks.add("NOTOK;KIT Spectacle non inclu: ");
        oks.add("NOTOK;KIT utiliser: ");
        oks.add("NOTOK;Port Incorrecte ");
        oks.add("NOTOK;Port invalide Presse ");
        oks.add("NOTOK;Press VIP Utiliser 2 ");
        oks.add("NOTOK;Spectacle invalide");
        oks.add("NOTOK;utiliser");
        oks.add("NOTOK;utiliser  invitation 2 personne ");
        oks.add("NOTOK;utiliser 1 personne invitation");
        oks.add("NOTOK;utiliser Online");
        oks.add("NOTOK;utiliser Press ");
        oks.add("NOTOK;utiliser Staff organisation utiliser");
        oks.add("NOTOK;utiliser VIP 2 ");


        oks.add("OK;billet payant success chaise public a travers VIP portchaises");
        oks.add("OK;chaises");
        oks.add("OK;demi tarif Success");
        oks.add("OK;gradins");
        oks.add("OK;KIT B");
        oks.add("OK;KIT GRATUIT  1 personnes reussie");
        oks.add("OK;KIT GRATUIT 2 personnes reussie");
        oks.add("OK;KIT success");
        oks.add("OK;Online");
        oks.add("OK;Pass");
        oks.add("OK;Press success");
        oks.add("OK;Press VIP success");
        oks.add("OK;success  invitation");
        oks.add("OK;success  invitation 2 personne");
        oks.add("OK;Success Badges comite direction");
        oks.add("OK;Success Entrer Staff organisation");
        oks.add("OK;VIP success");
      
             
    }

    public List<Trans_1> getTrans_1s() {
        return trans_1s;
    }

    public void setTrans_1s(List<Trans_1> trans_1s) {
        this.trans_1s = trans_1s;
    }

    public List<String> getOks() {
       
        return oks;
    }

    public void setOks(List<String> oks) {
        this.oks = oks;
    }

    public void consulter() {
        
        

        
    


    }
    public int haveCount(String s)
    {
        Date d=new Date();
        d.setHours(d.getHours()-7);
        //System.out.println("date="+(d.getYear()+1900)+"-"+d.getMonth()+"-"+d.getDay());
        return transDAO.findByEtatCount(s,"2013-07-23");
    }
}
